{% macro set_token(token) -%}
<input type="hidden" name="token" value="{{ token|e }}">
{%- endmacro %}

{% macro item(item) -%}
<div itemscope itemtype="http://schema.org/Product">
  <h1 itemprop="name">{{ item.title|e }}</h1>
  {% if item.image %}
    <img itemprop="image" src="" />
  {% else %}
    <img src="/assets/no_item_image.png" />
  {% endif %}
  <div itemprop="description">{{ item.description|d("No Description", true)|e }}</div>
  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <p itemprop="price">${{ item.price|e }}</p>
    <p>Posted at <time>{{ item.creation_time|datetimeformat|e }}</time></p>
    <p>Sold by <a itemprop="seller" href="/user/{{ item.seller.key().id()|e }}">{{ item.seller.name|e }}</a></p>
  </div>
</div>
{%- endmacro %}
